Robbery
Introduction
Squizer's advanced robbery system that allows you to rob ATMs, Houses, Shops (2 types of vaults + cash registers), vangelico, set bodyguards do defend places & MUCH MORE!
Get it now!
Instalation
- Put ensure sqz_robbery to your start config and resource called sqz_robbery into your resources folder
- Configure config.lua & locales.lua
- Change the items that are needed for a robbery or put them into the database, if they are not here already
- Run the provided SQL file (sql.sql)
- Download the dependencies: mhacking, progressBars, utk_fingerprint Config Files
Dependencies
- mhacking
- utk_fingerprint & utk_hackdependency
- progressBars OPTIONAL: Can be replaced in client edit files
If you are using ps-dispatch
- If you are using ps-dispatch, follow these steps
- Insert these values at the end of Config.Blips table in ps-dispatch/shared/config.lua (by default on line 446)
['vaultrobbery'] = {
radius = 2.0,
sprite = 527,
color = 1,
scale = 0.9,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = true,
flash = false
},
['cashregisterrobbery'] = {
radius = 2.0,
sprite = 497,GetStreetAndZone
color = 1,
scale = 0.9,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = true,
flash = false
},
['atmrobbery'] = {
radius = 2.0,
sprite = 521,
color = 1,
scale = 0.9,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = true,
flash = false
},
- Insert these values into ps-dispatch/fxmanifest.lua at the bottom of the file
client_exports {
'GetPlayerGender',
'GetStreetAndZone'
}
ps-dispatch example files:
- ps-dispatched/shared/config.lua
- fxmanifest.lua
Config = Config or {}
Config.ShortCalls = false -- Dispatch notifications are sent containing only the alert name, omitting additional details. For more information, the dispatch menu can be accessed.
Config.Debug = false -- Enables debug and send alerts when leo break the law.
Config.RespondKeybind = 'E'
Config.OpenDispatchMenu = 'O'
Config.AlertTime = 5 -- Specify the duration for the alert to appear on the screen. The default time is 5 seconds for all alerts. To set a different duration for specific alerts, change the value in `alertTime = nil` found in the alerts.lua file.
Config.MaxCallList = 25 -- maximum dispatch calls in dispatch list
Config.OnDutyOnly = true -- Set true if only on duty players can see the alert
Config.Jobs = { -- Job Types or names that can access the dispatch menu. If you want to allow more jobs to see certain dispatch alerts. Go to alerts.lua and add the job name to the alert.
"leo",
"ems"
}
Config.AlertCommandCooldown = 60 -- this would make the command work every 60 seconds to avoid spamming
Config.DefaultAlertsDelay = 5 -- Delay between each default alert, prevent spamming
Config.DefaultAlerts = {
Speeding = true,
Shooting = true,
Autotheft = true,
Melee = true,
PlayerDowned = true,
Explosion = true
}
Config.MinOffset = 1
Config.MaxOffset = 120
Config.PhoneRequired = true -- Set true if only can use 911/311 command when got a phone on inventory.
Config.PhoneItems = { -- Add the entire list of your phone items.
"phone",
}
-- Locations for the Hunting Zones and No Dispatch Zones( Label: Name of Blip // Radius: Radius of the Alert and Blip)
Config.EnableHuntingBlip = true
Config.Locations = {
["HuntingZones"] = {
[1] = {label = "Hunting Zone", radius = 650.0, coords = vector3(-938.61, 4823.99, 313.92)},
},
["NoDispatchZones"] = {
[1] = {label = "Ammunation 1", coords = vector3(13.53, -1097.92, 29.8), length = 14.0, width = 5.0, heading = 70, minZ = 28.8, maxZ = 32.8},
[2] = {label = "Ammunation 2", coords = vector3(821.96, -2163.09, 29.62), length = 14.0, width = 5.0, heading = 270, minZ = 28.62, maxZ = 32.62},
},
}
-- Whitelist Guns that do not send shooting alerts
Config.WeaponWhitelist = {
'WEAPON_GRENADE',
'WEAPON_BZGAS',
'WEAPON_MOLOTOV',
'WEAPON_STICKYBOMB',
'WEAPON_PROXMINE',
'WEAPON_SNOWBALL',
'WEAPON_PIPEBOMB',
'WEAPON_BALL',
'WEAPON_SMOKEGRENADE',
'WEAPON_FLARE',
'WEAPON_PETROLCAN',
'WEAPON_FIREEXTINGUISHER',
'WEAPON_HAZARDCAN',
'WEAPON_RAYCARBINE',
'WEAPON_STUNGUN'
}
Config.Blips = {
['vehicleshots'] = { -- Need to match the codeName in alerts.lua
radius = 0,
sprite = 119,
color = 1,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['shooting'] = {
radius = 0,
sprite = 110,
color = 1,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['speeding'] = {
radius = 0,
sprite = 326,
color = 84,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['fight'] = {
radius = 0,
sprite = 685,
color = 69,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['civdown'] = {
radius = 0,
sprite = 126,
color = 3,
scale = 1.5,
length = 2,
sound = 'dispatch',
offset = false,
flash = false
},
['civdead'] = {
radius = 0,
sprite = 126,
color = 3,
scale = 1.5,
length = 2,
sound = 'dispatch',
offset = false,
flash = false
},
['911call'] = {
radius = 0,
sprite = 480,
color = 1,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['311call'] = {
radius = 0,
sprite = 480,
color = 3,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['officerdown'] = {
radius = 15.0,
sprite = 526,
color = 1,
scale = 1.5,
length = 2,
sound = 'panicbutton',
offset = false,
flash = true
},
['officerbackup'] = {
radius = 15.0,
sprite = 526,
color = 1,
scale = 1.5,
length = 2,
sound = 'panicbutton',
offset = false,
flash = true
},
['officerdistress'] = {
radius = 15.0,
sprite = 526,
color = 1,
scale = 1.5,
length = 2,
sound = 'panicbutton',
offset = false,
flash = true
},
['emsdown'] = {
radius = 15.0,
sprite = 526,
color = 3,
scale = 1.5,
length = 2,
sound = 'panicbutton',
offset = false,
flash = false
},
['hunting'] = {
radius = 0,
sprite = 141,
color = 2,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['storerobbery'] = {
radius = 0,
sprite = 52,
color = 1,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['bankrobbery'] = {
radius = 0,
sprite = 500,
color = 2,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['paletobankrobbery'] = {
radius = 0,
sprite = 500,
color = 12,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['pacificbankrobbery'] = {
radius = 0,
sprite = 500,
color = 5,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['bobcatsecurityheist'] = {
radius = 0,
sprite = 500,
color = 5,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['prisonbreak'] = {
radius = 0,
sprite = 189,
color = 59,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['vangelicorobbery'] = {
radius = 0,
sprite = 434,
color = 5,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['houserobbery'] = {
radius = 0,
sprite = 40,
color = 5,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['suspicioushandoff'] = {
radius = 120.0,
sprite = 469,
color = 52,
scale = 0,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = true,
flash = false
},
['yachtheist'] = {
radius = 0,
sprite = 455,
color = 60,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['vehicletheft'] = {
radius = 0,
sprite = 595,
color = 60,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['signrobbery'] = {
radius = 0,
sprite = 358,
color = 60,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['susactivity'] = {
radius = 0,
sprite = 66,
color = 37,
scale = 0.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
-- Rainmad Scripts
['artgalleryrobbery'] = {
radius = 0,
sprite = 269,
color = 59,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['humanelabsrobbery'] = {
radius = 0,
sprite = 499,
color = 1,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['trainrobbery'] = {
radius = 0,
sprite = 667,
color = 78,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['vanrobbery'] = {
radius = 0,
sprite = 67,
color = 59,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['undergroundrobbery'] = {
radius = 0,
sprite = 486,
color = 59,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['drugboatrobbery'] = {
radius = 0,
sprite = 427,
color = 26,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['unionrobbery'] = {
radius = 0,
sprite = 500,
color = 60,
scale = 1.5,
length = 2,
sound = 'robberysound',
offset = false,
flash = false
},
['carboosting'] = {
radius = 0,
sprite = 595,
color = 60,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['carjack'] = {
radius = 0,
sprite = 595,
color = 60,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
['explosion'] = {
radius = 75.0,
sprite = 436,
color = 1,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = true,
flash = false
}
}
Config.Colors = {
['0'] = "Metallic Black",
['1'] = "Metallic Graphite Black",
['2'] = "Metallic Black Steel",
['3'] = "Metallic Dark Silver",
['4'] = "Metallic Silver",
['5'] = "Metallic Blue Silver",
['6'] = "Metallic Steel Gray",
['7'] = "Metallic Shadow Silver",
['8'] = "Metallic Stone Silver",
['9'] = "Metallic Midnight Silver",
['10'] = "Metallic Gun Metal",
['11'] = "Metallic Anthracite Grey",
['12'] = "Matte Black",
['13'] = "Matte Gray",
['14'] = "Matte Light Grey",
['15'] = "Util Black",
['16'] = "Util Black Poly",
['17'] = "Util Dark silver",
['18'] = "Util Silver",
['19'] = "Util Gun Metal",
['20'] = "Util Shadow Silver",
['21'] = "Worn Black",
['22'] = "Worn Graphite",
['23'] = "Worn Silver Grey",
['24'] = "Worn Silver",
['25'] = "Worn Blue Silver",
['26'] = "Worn Shadow Silver",
['27'] = "Metallic Red",
['28'] = "Metallic Torino Red",
['29'] = "Metallic Formula Red",
['30'] = "Metallic Blaze Red",
['31'] = "Metallic Graceful Red",
['32'] = "Metallic Garnet Red",
['33'] = "Metallic Desert Red",
['34'] = "Metallic Cabernet Red",
['35'] = "Metallic Candy Red",
['36'] = "Metallic Sunrise Orange",
['37'] = "Metallic Classic Gold",
['38'] = "Metallic Orange",
['39'] = "Matte Red",
['40'] = "Matte Dark Red",
['41'] = "Matte Orange",
['42'] = "Matte Yellow",
['43'] = "Util Red",
['44'] = "Util Bright Red",
['45'] = "Util Garnet Red",
['46'] = "Worn Red",
['47'] = "Worn Golden Red",
['48'] = "Worn Dark Red",
['49'] = "Metallic Dark Green",
['50'] = "Metallic Racing Green",
['51'] = "Metallic Sea Green",
['52'] = "Metallic Olive Green",
['53'] = "Metallic Green",
['54'] = "Metallic Gasoline Blue Green",
['55'] = "Matte Lime Green",
['56'] = "Util Dark Green",
['57'] = "Util Green",
['58'] = "Worn Dark Green",
['59'] = "Worn Green",
['60'] = "Worn Sea Wash",
['61'] = "Metallic Midnight Blue",
['62'] = "Metallic Dark Blue",
['63'] = "Metallic Saxony Blue",
['64'] = "Metallic Blue",
['65'] = "Metallic Mariner Blue",
['66'] = "Metallic Harbor Blue",
['67'] = "Metallic Diamond Blue",
['68'] = "Metallic Surf Blue",
['69'] = "Metallic Nautical Blue",
['70'] = "Metallic Bright Blue",
['71'] = "Metallic Purple Blue",
['72'] = "Metallic Spinnaker Blue",
['73'] = "Metallic Ultra Blue",
['74'] = "Metallic Bright Blue",
['75'] = "Util Dark Blue",
['76'] = "Util Midnight Blue",
['77'] = "Util Blue",
['78'] = "Util Sea Foam Blue",
['79'] = "Uil Lightning blue",
['80'] = "Util Maui Blue Poly",
['81'] = "Util Bright Blue",
['82'] = "Matte Dark Blue",
['83'] = "Matte Blue",
['84'] = "Matte Midnight Blue",
['85'] = "Worn Dark blue",
['86'] = "Worn Blue",
['87'] = "Worn Light blue",
['88'] = "Metallic Taxi Yellow",
['89'] = "Metallic Race Yellow",
['90'] = "Metallic Bronze",
['91'] = "Metallic Yellow Bird",
['92'] = "Metallic Lime",
['93'] = "Metallic Champagne",
['94'] = "Metallic Pueblo Beige",
['95'] = "Metallic Dark Ivory",
['96'] = "Metallic Choco Brown",
['97'] = "Metallic Golden Brown",
['98'] = "Metallic Light Brown",
['99'] = "Metallic Straw Beige",
['100'] = "Metallic Moss Brown",
['101'] = "Metallic Biston Brown",
['102'] = "Metallic Beechwood",
['103'] = "Metallic Dark Beechwood",
['104'] = "Metallic Choco Orange",
['105'] = "Metallic Beach Sand",
['106'] = "Metallic Sun Bleeched Sand",
['107'] = "Metallic Cream",
['108'] = "Util Brown",
['109'] = "Util Medium Brown",
['110'] = "Util Light Brown",
['111'] = "Metallic White",
['112'] = "Metallic Frost White",
['113'] = "Worn Honey Beige",
['114'] = "Worn Brown",
['115'] = "Worn Dark Brown",
['116'] = "Worn straw beige",
['117'] = "Brushed Steel",
['118'] = "Brushed Black Steel",
['119'] = "Brushed Aluminium",
['120'] = "Chrome",
['121'] = "Worn Off White",
['122'] = "Util Off White",
['123'] = "Worn Orange",
['124'] = "Worn Light Orange",
['125'] = "Metallic Securicor Green",
['126'] = "Worn Taxi Yellow",
['127'] = "Police Car Blue",
['128'] = "Matte Green",
['129'] = "Matte Brown",
['130'] = "Worn Orange",
['131'] = "Matte White",
['132'] = "Worn White",
['133'] = "Worn Olive Army Green",
['134'] = "Pure White",
['135'] = "Hot Pink",
['136'] = "Salmon pink",
['137'] = "Metallic Vermillion Pink",
['138'] = "Orange",
['139'] = "Green",
['140'] = "Blue",
['141'] = "Mettalic Black Blue",
['142'] = "Metallic Black Purple",
['143'] = "Metallic Black Red",
['144'] = "hunter green",
['145'] = "Metallic Purple",
['146'] = "Metallic Dark Blue",
['147'] = "Black",
['148'] = "Matte Purple",
['149'] = "Matte Dark Purple",
['150'] = "Metallic Lava Red",
['151'] = "Matte Forest Green",
['152'] = "Matte Olive Drab",
['153'] = "Matte Desert Brown",
['154'] = "Matte Desert Tan",
['155'] = "Matte Foilage Green",
['156'] = "Default Alloy Color",
['157'] = "Epsilon Blue",
['158'] = "Pure Gold",
['159'] = "Brushed Gold",
['160'] = "MP100"
}
fx_version 'cerulean'
game "gta5"
author "Project Sloth & OK1ez"
version '2.2.1'
lua54 'yes'
ui_page 'html/index.html'
-- ui_page 'http://localhost:5173/' --for dev
client_script {
'@PolyZone/client.lua',
'@PolyZone/CircleZone.lua',
'@PolyZone/BoxZone.lua',
'client/**',
}
server_script {
"server/**",
}
shared_script {
"shared/**",
'@ox_lib/init.lua',
}
files {
'html/**',
'locales/*.json',
}
client_exports {
'GetPlayerGender',
'GetStreetAndZone'
}
ox_lib 'locale' -- v3.8.0 or above
Config Files
- config
- locales
- Client Edit File
Config = {}
--=================================================--
--===================MAIN PART=====================--
--=================================================--
Config.CustomEvents = {
['esx:getSharedObject'] = 'esx:getSharedObject',
['esx:setJob'] = 'esx:setJob'
}
--=================================================--
--===============CASH ROBBERIES PART===============--
--=================================================--
Config.CashRegisterTime = 10000 * 1000 -- Time between the cash registers reset
Config.CashRegisterMoney = {
Min = 10,
Max = 50,
RobRounds = 21
}
Config.CashRegisterMinCops = 1 -- Min cops to start cash register robbery
--=================================================--
--====================MISCS PART===================--
--=================================================--
Config.Locale = 'en' -- Locale of the whole script
Config.DrawDistance = 5
Config.PoliceJobNames = { -- List of players that will count as online cops
['police'] = true,
['sheriff'] = true
}
Config.UseOnlyTimers = false -- If we should use for the vaults timers that all the timers would have all the time same amount of money or FALSE to give the vault money each time period
Config.VaultsResetTime = 1000 -- The timer until you will be again able to rob the vault that has been robbed || Or how often the money will be added to the safe if you have the previous option disabled
--=================================================--
--===============MAIN ROBBERIES PART===============--
--=================================================--
Config.Vaults = {
{
Type = 'code', -- code / lock
Loc = vector3(28.1998,-1338.7881,29.577), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 25000,
Min = 3000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 5000, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 359.0,
BombPos = vector3(28.1715,-1338.9655,29.017)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(-43.445,-1748.3655,29.421), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 15000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 650,
CurrentMoney = 5000, -- The money that the shop will have
},
Items = {
{'keys', 1},
{'clip', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 29.42,
BombPos = vector3(-43.6715,-1748.2133,28.941)
}
},
{
Type = 'lock', -- code / lock
Loc = vector3(-1220.7699,-916.0138,11.3263), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 5000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 650,
CurrentMoney = 5000, -- The money that the shop will have
},
Items = {
{'bread', 1},
{'phone', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 123.9,
BombPos = vector3(-1221.0244,-916.1847,11.3263)
}
},
{
Type = 'lock', -- code / lock
Loc = vector3(1126.9186,-980.1438,45.4158), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 19000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 650,
CurrentMoney = 5000, -- The money that the shop will have
},
Items = {
{'phone', 1}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 1.17,
BombPos = vector3(1126.7133,-979.8168,45.0558)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(-709.7255,-904.0894,19.2156), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 25000,
Min = 3000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 5000, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 92.84,
BombPos = vector3(-710.0529,-904.2296,18.6156)
}
},
{
Type = 'lock', -- code / lock
Loc = vector3(-1478.9451,-375.4349,39.1634), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 19000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 650,
CurrentMoney = 5000, -- The money that the shop will have
},
Items = {
{'phone', 1}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 224.0,
BombPos = vector3(-1478.8337,-375.5812,38.6834)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(1159.4976,-314.1253,69.2051), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 25000,
Min = 3000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 5000, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 98.18,
BombPos = vector3(1159.337,-314.1523,68.6051)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(378.1759,333.3954,103.5664), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 300,
Min = 5000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 7500, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 342.96,
BombPos = vector3(378.1842,333.5868,103.0864)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(2549.2434,384.9183,108.6229), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 20000,
Min = 5000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 4500, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 88.55,
BombPos = vector3(2548.9436,384.9243,108.023)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(-1829.2214,798.7365,138.1924), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 20000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 3500, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 134.56,
BombPos = vector3(-1829.3315,798.6214,137.6522)
}
},
{
Type = 'lock', -- code / lock
Loc = vector3(-2959.582,387.1539,14.0433), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 25000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 4000, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 180.54,
BombPos = vector3(-2959.5791,386.7993,13.4433)
}
},
{
Type = 'lock', -- code / lock
Loc = vector3(-3047.8455,585.7594,7.9089), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 25000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 4000, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 109.09,
BombPos = vector3(-3048.0991,585.5559,7.2489)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(-3249.9912,1004.4037,12.8307), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 23000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 3800, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 85.33,
BombPos = vector3(-3250.3118,1004.368,12.0507)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(546.417,2662.8401,42.1565), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 21000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 3700, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 181.71,
BombPos = vector3(546.4929,2662.6619,41.4965)
}
},
{
Type = 'lock', -- code / lock
Loc = vector3(1169.3201,2717.8064,37.1577), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 20000,
Min = 1000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 3500, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 269.08,
BombPos = vector3(1169.4701,2717.804,36.5577)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(1169.3201,2717.8064,37.1577), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 22000,
Min = 2000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 3600, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 66.9,
BombPos = vector3(2672.5547,3286.7773,54.3905)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(1959.2516,3748.8276,32.3437), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 35000,
Min = 4000,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 4500, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 29.7,
BombPos = vector3(1959.1027,3749.0879,31.8637)
}
},
{
Type = 'code', -- code / lock
Loc = vector3(1734.7697,6420.8428,35.0372), -- Location of the vault
MinCops = 0,
Robbed = false, -- It is good to not touch it
Money = {
Max = 18000,
Min = 750,
-- Refilling part:
Timer = 1000,
Money = 800,
CurrentMoney = 1000, -- The money that the shop will have
},
Items = {
{'flashdisk', 1},
{'laptop', 2}
},
Detonate = {
ItemName = 'bomb', -- The item name you would need for detonating
},
BombAnimation = {
Heading = 338.19,
BombPos = vector3(1734.9073,6421.1587,34.4372)
}
},
}
--=================================================--
--================VANGELICO ROBBERY================--
--=================================================--
Config.Vangelico = {
{
StartPos = vector3(-629.8461,-236.568,37.1571), -- Start position of the vangelico
MinCops = 1, -- Min cops to start the robbery
showcases = {
{pos = vector3(-626.735, -238.545, 38.057), robbed= false}, -- Locations of the show cases
{pos = vector3(-625.697, -237.877, 38.057), robbed= false},
{pos = vector3(-626.825, -235.347, 38.057), robbed= false},
{pos = vector3(-625.77, -234.563, 38.057), robbed= false},
{pos = vector3(-627.957, -233.918, 38.057), robbed= false},
{pos = vector3(-624.433, -231.161, 38.057), robbed= false},
{pos = vector3(-623.045, -232.969, 38.057), robbed= false},
{pos = vector3(-620.265, -234.502, 38.057), robbed = false},
{pos = vector3(-619.225, -233.677, 38.057), robbed= false},
{pos = vector3(-620.025, -233.354, 38.057), robbed= false},
{pos = vector3(-617.487, -230.605, 38.057), robbed= false},
{pos = vector3(-618.304, -229.481, 38.057), robbed= false},
{pos = vector3(-619.741, -230.32, 38.057), robbed= false},
{pos = vector3(-619.686, -227.753, 38.057), robbed= false},
{pos = vector3(-620.481, -226.59, 38.057), robbed= false},
{pos = vector3(-621.098, -228.495, 38.057), robbed= false},
{pos = vector3(-623.855, -227.051, 38.057), robbed= false},
{pos = vector3(-624.977, -227.884, 38.057), robbed= false},
{pos = vector3(-624.056, -228.228, 38.057), robbed= false},
},
Loot = {
Items = {
{name = 'jewels', count = {max = 5, min = 3}}, -- The loot from 1 show case
{name = 'rolex-watch', count = {max = 2, min = 1}}
},
},
robbed = false -- This is fine to not touch
}
}
--=================================================--
--=================House Robberies=================--
--=================================================--
Config.Houses = {
{
MinCops = 1, -- Min cops needed to start the robbery
StartPos = vector3(1386.0764,-593.4464,73.5855), -- Start location of the burglary
HouseInCoords = vector3(346.52, -1013.19, -100.1), -- Position of teleport in house
IsOpened = false, -- Good to not touch
Locations = {
{Pos = vector3(346.1058,-1001.6822,-100.0962), Items = { -- Location of robable place
{Name = 'laptop', Amount = 1}, -- Amounts + Items in that place, supports weapons + items
{Name = 'jewels', Amount = 10}
}, Money = 150, Robbed = false}, -- Money is money and Robbed is enought to not touch
{Pos = vector3(339.2252,-1003.3469,-100.0962), Items = {
{Name = 'phone', Amount = 2},
}, Money = 500, Robbed = false},
}
}
}
--=================================================--
--====================BODYGUARDS===================--
--=================================================--
Config.Bodyguards = {
{
Pos = vector3(-624.3985,-225.2342,38.057), -- Position of spawned bodyguard
Heading = 151.87, -- Heading of the bodygurad
spawned = false, -- Those 3 variables are fine to not be touched
hp = 100.0,
armour = 100.0
},
{
Pos = vector3(-617.6118,-235.7391,38.057),
Heading = 50.6,
spawned = false,
hp = 100,
armour = 100.0
}
}
--=================================================--
--=======================ATMS======================--
--=================================================--
Config.ATMs = {
RespawnTimer = 10 * 60 * 60 * 1000, -- Respawn timer of each ATM to be able get again robbed
ItemNeededForOpening = 'oxcutter', -- Item needed for opening ATM using force (if you fail cracking it)
Money = {
Max = 20000, -- Max money you can get from the ATM
Min = 10000,
TakeMax = 10, -- The money per 1 grab you take maximal-y
TakeMin = 5, -- THe money per 1 grab you can take minimally
},
MinCops = 1 -- Min Cops to start ATM robbery
}
Config.DisableAtmRobbery = false -- Will completely disable ATM robbery part
--=================================================--
--================DISPATCH SETTINGS================--
--=================================================--
Config.Dispatch = {
['vaults'] = {
BlipSprite = 119,
BlipColour = 48,
BlipFlashes = true,
BlipTimeout = 60000,
BlipName = 'Vault robbery',
Notification = 'Someone is is not behaving in the shop and is trying to get to the vault. Go and check it.'
},
['cashRobberies'] = {
BlipSprite = 119,
BlipColour = 48,
BlipFlashes = true,
BlipTimeout = 60000,
BlipName = 'Cash register Robbery',
Notification = 'Someone is is not behaving in the shop and is trying to open the cash register. Go and check it.'
},
['houses'] = {
BlipSprite = 557,
BlipColour = 46,
BlipFlashes = true,
BlipTimeout = 60000,
BlipName = 'Burglary',
Notification = 'Neighbours reported opened doors of couple that is on holiday. There is something suspicious'
},
['atms'] = {
BlipSprite = 472,
BlipColour = 27,
BlipFlashes = true,
BlipTimeout = 60000,
BlipName = 'Breaking into ATM',
Notification = 'The security system of ATM has detected a malware in ATM. Get the money secured.'
},
['vangelico'] = {
BlipSprite = 354,
BlipColour = 11,
BlipFlashes = true,
BlipTimeout = 60000,
BlipName = 'Robbery in vangelico',
Notification = 'Someone is shooting in vangelico. I am worried the bodyguards will not be enough force to stop them.'
},
}
Locales['en'] = {
['not_armed'] = 'You are not armed, how do you want to open the cash register?',
['e_to_rob_vault'] = 'Press [~g~E~s~] to rob this vault',
['not_min_cops'] = 'To rob without cops will not give you anything to life. To enjoy it the most you would need at least %s cops in the city.',
['already_robbed_vault'] = 'This vault is marked as police as robbed. Please wait until they will investigate it and open again the safe.',
['no_money_remaining'] = 'There are no money remaining in this vault',
['shoot_to_rob_vangelico'] = 'Shoot to show off and build some respect.',
['e_to_break_showcase'] = '~INPUT_PICKUP~ To break this showcase',
['e_to_lockpick'] = '~INPUT_PICKUP~ To lockpick the house',
['e_to_enter'] = '~INPUT_PICKUP~ To enter the house',
['e_to_leave'] = '~INPUT_PICKUP~ To leave the house',
['e_to_rob'] = '~INPUT_PICKUP~ To rob',
['robbery_aborted'] = 'You have aborted the robbery',
['cracking_failed'] = 'You failed to get to the vault without violence',
['cracking_succ'] = 'You have successfuly opened the safe',
-- Progress bars --
['connecting_to_lock_pin'] = 'You are connecting to the lock',
['planting_bomb'] = 'You are planting the bomb',
['taking_money_from_vault'] = 'You are taking money from vault',
-- Draw Texts
['detonate_vault?'] = '~o~Do you want to exit or detonate the vault?~s~',
['detonate_vault_yes'] = '~g~[E]~s~ - Detonate the vault',
['detonate_vault_no'] = '~r~[x]~r~ - Leave it be and leave',
['take_money_from_vault'] = '[~g~E~s~] Take pack of money from vault, remaining: %s',
['atm_open_using_force'] = 'You are trying to get into the ATM using force',
['take_money_from_atm'] = '[E] Take money from ATM, remaining: %s$',
['break_atm'] = '[E] Break Into ATM',
['atm_broken'] = 'This ATM is broken',
['get_to_atm_force'] = '~o~Do you want to open the safe using force? 50 percent chance of unsuccess~s~',
['atm_yes'] = '~g~[E]~s~ - Yes',
['atm_no'] = '~r~[x]~r~ - No',
['atm_rob_failed'] = 'The ATM was not successfuly robbed and no longer is possible to get into it',
['atm_rob_success'] = 'The ATM has been successfuly opened and now you can take money',
['stop_tasking_money'] = '~INPUT_VEH_DUCK~ To stop robbing the ATM',
['not_have_needed_item'] = 'You do not have the required item for breaking to the ATM'
}
if Config.ESXVersion == 'old' then
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent(Config.CustomEvents['esx:getSharedObject'], function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
elseif Config.ESXVersion == 'legacy' then
ESX = exports["es_extended"]:getSharedObject()
end
-- ############# VARIABLES #############
ATMModels = {
[GetHashKey('prop_atm_01')] = true,
[GetHashKey('prop_fleeca_atm')] = true,
[GetHashKey('prop_atm_02')] = true,
[GetHashKey('prop_atm_03')] = true,
}
function ShowNotification(msg)
ESX.ShowNotification(msg)
end
function ATMRobFailed(coords)
Citizen.CreateThread(function()
FreezeEntityPosition(ped, true)
while true do
Wait(0)
DrawScreenText(_U('get_to_atm_force'), 0.4, 0.4)
DrawScreenText(_U('atm_yes'), 0.4, 0.43)
DrawScreenText(_U('atm_no'), 0.4, 0.46)
if IsControlJustPressed(0, 74) then
TriggerServerEvent('sqz_robbery:OpenATMUsingForce', coords)
return
elseif IsControlJustPressed(0, 73) then
FreezeEntityPosition(ped, false)
TriggerServerEvent('sqz_robbery:vaults:RobberyAborted')
isBussy = false
return
end
end
end)
end
function DetonateVault(vaultIndex)
Citizen.CreateThread(function()
FreezeEntityPosition(ped, true)
while true do
Wait(0)
DrawScreenText(_U('detonate_vault?'), 0.4, 0.4)
DrawScreenText(_U('detonate_vault_yes'), 0.4, 0.43)
DrawScreenText(_U('detonate_vault_no'), 0.4, 0.46)
if IsControlJustPressed(0, 74) then
TriggerServerEvent('sqz_robbery:vaults:DetonateRequest', vaultIndex)
return
elseif IsControlJustPressed(0, 73) then
FreezeEntityPosition(ped, false)
currentlyRobbing = false
isBussy = false
TriggerServerEvent('sqz_robbery:vaults:RobberyAborted')
ShowNotification(_U('robbery_aborted'))
return
end
end
end)
end
function Draw3DText(x, y, z, text, lineCount)
local onScreen,_x,_y=World3dToScreen2d(x,y,z + 0.4)
local px,py,pz=table.unpack(GetGameplayCamCoords())
SetTextScale(0.5, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x,_y)
local factor = (string.len(text)) / 200
DrawRect(_x,_y+0.0105, 0.003+ factor, 0.03, 0, 0, 0, 200)
end
function DrawScreenText(text, x, y)
SetTextFont(11)
SetTextProportional(1)
SetTextScale(0.0, 0.4)
SetTextDropshadow(1, 0, 0, 0, 255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextEntry("STRING")
AddTextComponentString(text)
DrawText(x, y)
end
function TeleportToHouse(index)
local coords = Config.Houses[index].HouseInCoords
-- TO DO: Maybe some progress bars
TriggerServerEvent('sqz_robbery:house:EnterInstance', index)
DoScreenFadeOut(100)
RequestCollisionAtCoord(coords)
while not HasCollisionLoadedAroundEntity(PlayerPedId()) do
Citizen.Wait(0)
end
Citizen.Wait(750)
SetEntityCoords(PlayerPedId(), coords)
DoScreenFadeIn(100)
end
function LeaveHouse(index)
local coords = Config.Houses[index].StartPos
-- TO DO: Maybe some progress bars
TriggerServerEvent('sqz_robbery:house:LeaveInstance', index)
DoScreenFadeOut(100)
RequestCollisionAtCoord(coords)
while not HasCollisionLoadedAroundEntity(PlayerPedId()) do
Citizen.Wait(0)
end
Citizen.Wait(750)
SetEntityCoords(PlayerPedId(), coords)
DoScreenFadeIn(100)
end
function CanPedBreakCashRegister(playerPed)
if IsPedArmed(playerPed, 4) or IsPedArmed(playerPed, 1) then
return true
end
return false
end
RegisterNetEvent('sqz_robbery:TransmitDispatch', function(type, coords)
if GetResourceState('cd_dispatch') == 'started' then
if type == 'vaults' then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police', 'sheriff'},
coords = data.coords,
title = 'Store Robbery',
message = data.sex..' is robbing a store on the street '..data.street,
flash = 0,
unique_id = tostring(math.random(0000000,9999999)),
blip = {
sprite = 527,
scale = 0.9,
colour = 1,
flashes = false,
text = "911 - Store Robbery",
time = (5*60*1000),
sound = 1,
}
})
elseif type == 'cashRobberies' then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police', 'sheriff'},
coords = data.coords,
title = 'Cash Register Stolen',
message = data.sex..' someone has stolen a cash register in the street '..data.street,
flash = 0,
unique_id = tostring(math.random(0000000,9999999)),
blip = {
sprite = 497,
scale = 0.9,
colour = 1,
flashes = false,
text = "911 - Cash Register Stolen",
time = (5*60*1000),
sound = 1,
}
})
elseif type == 'houses' then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police', 'sheriff'},
coords = data.coords,
title = 'House Burglary',
message = data.sex..' someone has breached to a hous on the street '..data.street,
flash = 0,
unique_id = tostring(math.random(0000000,9999999)),
blip = {
sprite = 449231,
scale = 0.9,
colour = 1,
flashes = false,
text = "House Burglary",
time = (5*60*1000),
sound = 1,
}
})
elseif type == 'atms' then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police', 'sheriff'},
coords = data.coords,
title = 'ATM Software Failure',
message = 'The security systems of ATM on the street '..data.street.. ' have failed',
flash = 0,
unique_id = tostring(math.random(0000000,9999999)),
blip = {
sprite = 521,
scale = 0.9,
colour = 1,
flashes = false,
text = "ATM software Failure",
time = (5*60*1000),
sound = 1,
}
})
elseif type == 'vangelico' then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police', 'sheriff'},
coords = data.coords,
title = 'Jewelery Robbery',
message = data.sex..' is robbing a jewelery on the street '..data.street,
flash = 0,
unique_id = tostring(math.random(0000000,9999999)),
blip = {
sprite = 617,
scale = 0.9,
colour = 1,
flashes = false,
text = "Jewelery Robbery",
time = (5*60*1000),
sound = 1,
}
})
end
elseif GetResourceState('linden_outlawalert') == 'started' then
local data = {dispatchCode = 'shooting', caller = 'Someone is robbing', coords = coords, netId = NetworkGetNetworkIdFromEntity(PlayerPedId()), length = 4000}
TriggerServerEvent('wf-alerts:svNotify', data)
else
TriggerServerEvent('sqz_robbery:dispatch:RequestDispatch', type, coords)
end
end)
RegisterNetEvent('sqz_robbery:dispatch:BrodcastDispatch')
AddEventHandler('sqz_robbery:dispatch:BrodcastDispatch', function(type, coords, player)
if not Config.PoliceJobNames[ESX.PlayerData.job.name] then
return
end
if GetPlayerFromServerId(player) ~= -1 then
local mugshot, mugshotStr = ESX.Game.GetPedMugshot(GetPlayerPed(GetPlayerFromServerId(player)))
ESX.ShowAdvancedNotification('Camera', 'This person has been cought on the camera!', 'There is a photo of the person that has been caught on the camera with the last report.', mugshotStr, 1)
UnregisterPedheadshot(mugshot)
end
local dP = Config.Dispatch[type]
ShowNotification(dP.Notification)
local blip = AddBlipForCoord(coords)
SetBlipDisplay(blip, 4)
SetBlipHighDetail(blip, true)
SetBlipColour(blip, dP.BlipColour)
SetBlipSprite(blip, dP.BlipSprite)
SetBlipFlashes(blip, dP.BlipFlashes)
BeginTextCommandSetBlipName('STRING')
AddTextComponentSubstringPlayerName(dP.BlipName)
EndTextCommandSetBlipName(blip)
SetTimeout(dP.BlipTimeout, function()
RemoveBlip(blip)
end)
end)
RegisterNetEvent('sqz_robbery:StartBreakingIntoAtm')
AddEventHandler('sqz_robbery:StartBreakingIntoAtm', function(coords)
RobberyStarted('atm')
local ped = PlayerPedId()
TaskStartScenarioInPlace(ped, 'WORLD_HUMAN_STAND_MOBILE', 0, true)
Wait(1200)
TriggerEvent('sqz_robbery:TransmitDispatch', 'atms', GetEntityCoords(ped))
TriggerEvent("utk_fingerprint:Start", 4, 6, 2, function(success, reason)
ClearPedTasks(ped)
if success == true then
TriggerServerEvent('sqz_robbery:ATMRobbedSuccessfuly', coords)
elseif success == false then
ShowNotification(_U('atm_rob_failed'))
ATMRobFailed(coords)
end
end)
end)
function RobberyStarted(type)
-- type: atm/cashRegister/house/vangelico/vaultPin/vaultCode
end
function startProgress(lenghth, label)
exports['progressBars']:startUI(lenghth, label)
end
function LockObject(locking)
-- if locking == true then he is locking the object
if locking then
startProgress(5000, 'Locking the object')
else
startProgress(5000, 'Unlocking the object')
end
RequestAnimDict('mp_arresting')
while not HasAnimDictLoaded('mp_arresting') do Wait(10) end
TaskPlayAnim(PlayerPedId(), 'mp_arresting', 'a_uncuff', 8.0, -8, -1, 49, 0, 0, 0, 0)
SetTimeout(5000, function()
ClearPedTasks(PlayerPedId())
isLockingObject = false
end)
end
function BreakIntoSafe(index)
local status
local vP = Config.Vaults[index]
if vP.Type == 'code' then
TriggerEvent("mhacking:show")
TriggerEvent("mhacking:start",7,35,function(success)
TriggerEvent('mhacking:hide')
status = success
end)
elseif vP.Type == 'lock' then
return createSafe({math.random(0, 2), math.random(0, 2), math.random(0, 2), math.random(0, 2)})
end
while status == nil do Wait(200) end
return status
end
local itemNames = {}
RegisterNetEvent('sqz_robbery:ReceiveItemList', function(data)
itemNames = data
end)
function GetItemNameByItem(itemName)
if itemNames[itemName] then
return itemNames[itemName]
else
return itemName
end
end
--[[local index = 18 -- Only used for tests of correct bomb position
local bomba = CreateObject(GetHashKey("h4_prop_h4_ld_bomb_01a"), Config.Vaults[index].BombAnimation.BombPos, true, true, true)
while not DoesEntityExist(bomba) do
Wait(10)
end
SetEntityCollision(bomba, false, true)
DetachEntity(bomba, 1, 1)
FreezeEntityPosition(bomba, true)
SetEntityCoords(bomba, Config.Vaults[index].BombAnimation.BombPos)
SetEntityHeading(bomba, Config.Vaults[index].BombAnimation.Heading)]]